import instance from "@/utils/request";


export const getRoles = () => {
    return instance({
      method: "get",
      url: "/adminToRole/getRoles",
    });
  };

export const getRoleTables=(params)=>{
  return instance({
    method: "get",
    url:"/adminToRole/getRoleTables",
    params
  })
}


export const updateRoleTable = (data) => {
  return instance({
    method: "put",
    url: "/adminToRole/updateRoleTable",
    data,
  });
};
export const addRoleTable = (data) => {
  return instance({
    method: "post",
    url: "/adminToRole/addRoleTable",
    data,
  });
};
export const deleteRoleTable = (data) => {
  return instance({
    method: "delete",
    url: `/adminToRole/deleteRoleTable/${data}`,
  });
};
